#include <cstdlib>

#include <iostream>

#include <windows.h>

#include <Tlhelp32.h>

using namespace std;

int main () {
	DWORD Pro_ID =0; //DWORD is type of pointer
////////////////
	cout<<"Checking War3 windows......"<<endl;
	HWND HW_War=FindWindowA("Warcraft III",NULL);
	if (HW_War==NULL) {
		cout<<"+Fail"<<endl;
		return 0;
	} else {
		cout<<"+OK"<<endl;
		
	}
//////////////
	cout<<"Finding progress ID......"<<endl;
	LPDWORD lp_ProID =NULL;
	lp_ProID =&Pro_ID;
	GetWindowThreadProcessId(HW_War,lp_ProID);

	///////////////////

 	return 0;
}